POV-Ray : Newsgroups : povray.general : Requesting ideas/opinions for RNG seeding syntax : Re: Requesting ideas/opinions for RNG seeding syntax Server Time
30 Jul 2024 16:25:21 EDT (-0400)
  Re: Requesting ideas/opinions for RNG seeding syntax  
From: clipka
Date: 20 May 2009 11:05:01
Message: <web.4a141b4b38187d7ef708085d0@news.povray.org>
"Tim Attwood" <tim### [at] anti-spamcomcastnet> wrote:
> Seed is probably one of the commands that would belong in
> the environment section, along with camera, photons, and radiosity.
> It's part of the starting state of the renderer.

Not if it's used in some huge macro. In that case, it's part of the starting
state of the macro.


> RNG_Identifier = random_number_generator {
>    [type POV36 | mersenne_twister]
>    seed Float | Float_Identifier
> };
>
> It's a bit more verbose, but it's more amenable to be
> extended in the future.

I'd actually favor something like:

My_Random_Stream = Pov36_Rng(4711);
My_Random_Number = My_Random_Stream.getNext();

Other_Random_Stream = Mersenne_Twister_Rng(...);
Other_Random_Number = Other_Random_Stream.getNext();

i.e. sort of defining the different RNGs as different, independent objects
(which just "happen" to use the same method identifier to get the next value).

But that's "future music" as we'd say in German.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.